//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.eResearch.RuntimeServices.Monitoring
{
    using System;
    using System.Threading;

    public static class TimerHelper
    {
        public static Timer Create(long period, Action action)
        {
            return new Timer((o) => action(), null, 0, period);
        }

        public static Timer Create<T>(long period, T state, Action<T> action)
        {
            return new Timer((o) => action(state), state, 0, period);
        }
    }
}
